package com.shyroke.service;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.List;

import javax.servlet.ServletContext;

import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import com.shyroke.entity.XiaoShuo;
import com.shyroke.entity.XiaoShuoBean;
import com.shyroke.entity.XiaoShuoEnum;

@Service
public interface XiaoShuoServiceI {

	/**
	 * 根据用户ID获取该用户的所有长篇小说
	 * @param id
	 * @param context 
	 * @return
	 */
	List<String> getAllXiaoshuoByUserId(Integer id, ServletContext context,String quanxian);

	/**
	 * 保存小说记录
	 * @param xiaoShuo
	 * @param file 
	 */
	void insert(XiaoShuo xiaoShuo, MultipartFile file) throws UnsupportedEncodingException, IOException ;

	/**
	 * 根据用户ID和小说名获取小说
	 * @param id
	 * @param wenjianjia
	 * @param context 
	 * @return
	 */
	XiaoShuo selectByUserIdAndFileName(Integer id, String wenjianjia)  ;

}
